package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.feign.PaymentFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.net.URI;
import java.util.List;

/**
 * @Author: cheng song
 * @Description:
 * @Date: Created in 22:45 2021/9/4
 * @ModifiedBy:
 */
@RestController
public class OrderFeignController {

    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping(value = "/consumer/payment/get/{id}")
    public CommonResult selectPaymentById(@PathVariable("id") Long id) {
        return paymentFeignService.selectPaymentById(id);
    }

    @GetMapping(value = "/consumer/payment/feign/timeout")
    public CommonResult timeout() {
        return paymentFeignService.timeout();
    }
}
